package com.kfm.base.function;

public class Demo07 {

    public static void main(String[] args) {
        /*
            java 中只有值传递
         */

//        int[] a = {10};
//        int a = 10;
        int a = 10, b = 9, c= 8;
        int[] arr = new int[]{a, b, c};
        change(arr);

        System.out.println(a);
        System.out.println(b);
        System.out.println(c);

//        System.out.println(a);
//        System.out.println(Arrays.toString(a));
    }

    public static int change(int n){
        n += 10;
        return n;
    }

    public static void change(int[] a){
        a[0] = 6;
        a = new int[]{1};
    }

//    public static void change(int ... a){
//        System.out.println(a);
//        a[0] = 5;
//        a[1] = 6;
//        a[2] = 7;
//    }
}
